import { Navigate } from 'react-router-dom'
import HomePage from '../views/homePage'
import LoginPage from '../views/loginPage'

import HomePage_PanoramicMonitoringPage from '../views/homePage/page/panoramicMonitoring'
import HomePage_RealRimeDynamicsPage from '../views/homePage/page/realRimeDynamics'
import HomePage_EventWarningPage from '../views/homePage/page/eventWarning'
import HomePage_StatisticalQueryPage from '../views/homePage/page/statisticalQuery'
import HomePage_DebuggingAndTestingPage from '../views/homePage/page/debuggingAndTesting'
import HomePage_DataMaintenancePage from '../views/homePage/page/dataMaintenance'
import HomePage_SystemSettingsPage from '../views/homePage/page/systemSettings'
import HomePage_RealRimeDynamicsPage_FullMainTransformerPage from '../views/homePage/page/realRimeDynamics/page/fullMainTransformer'
import HomePage_RealRimeDynamicsPage_MultiMainTransformerPage from '../views/homePage/page/realRimeDynamics/page/multiMainTransformer'
import HomePage_RealRimeDynamicsPage_SingleMainTransformerPage from '../views/homePage/page/realRimeDynamics/page/singleMainTransformer'
import HomePage_RealRimeDynamicsPage_FullLinePage from '../views/homePage/page/realRimeDynamics/page/fullLine'
import HomePage_RealRimeDynamicsPage_MultipleLinePage from '../views/homePage/page/realRimeDynamics/page/multipleLine'
import HomePage_RealRimeDynamicsPage_SingleLinePage from '../views/homePage/page/realRimeDynamics/page/singleLine'
import HomePage_StatisticalQueryPage_EventStatisticsPage from '../views/homePage/page/statisticalQuery/page/eventStatistics'
import HomePage_StatisticalQueryPage_RecordsOperationsPage from '../views/homePage/page/statisticalQuery/page/recordsOperations'
import HomePage_StatisticalQueryPage_CurveAnalysisPage from '../views/homePage/page/statisticalQuery/page/curveAnalysis'
import HomePage_StatisticalQueryPage_AssessmentReportPage from '../views/homePage/page/statisticalQuery/page/assessmentReport'
import HomePage_StatisticalQueryPage_MainTransformerLedgerPage from '../views/homePage/page/statisticalQuery/page/mainTransformerLedger'
import HomePage_StatisticalQueryPage_SeparateLedgerPage from '../views/homePage/page/statisticalQuery/page/separateLedger'
import HomePage_StatisticalQueryPage_MainTransformerHistoryData from '../views/homePage/page/statisticalQuery/page/mainTransformerHistoryData'
import HomePage_StatisticalQueryPage_LineLedgerPage from '../views/homePage/page/statisticalQuery/page/lineLedger'
import HomePage_StatisticalQueryPage_LineHistoryDataPage from '../views/homePage/page/statisticalQuery/page/lineHistoryData'
import HomePage_StatisticalQueryPage_MainTransformerNumericalAnalysisPage from '../views/homePage/page/statisticalQuery/page/mainTransformerNumericalAnalysis'
import HomePage_StatisticalQueryPage_LineNumericalAnalysisPage from '../views/homePage/page/statisticalQuery/page/lineNumericalAnalysis'
import HomePage_DebuggingAndTestingPage_PortableDeviceAccessPage from '../views/homePage/page/debuggingAndTesting/page/portableDeviceAccess'
import HomePage_DebuggingAndTestingPage_StrategicInvestmentPage from '../views/homePage/page/debuggingAndTesting/page/strategicInvestment'
import HomePage_DebuggingAndTestingPage_ManualSwitchingPage from '../views/homePage/page/debuggingAndTesting/page/manualSwitching'
import HomePage_DataMaintenancePage_SubstationMaintenancePage from '../views/homePage/page/dataMaintenance/page/substationMaintenance'
import HomePage_DataMaintenancePage_MainTransformerMaintenancePage from '../views/homePage/page/dataMaintenance/page/mainTransformerMaintenance'
import HomePage_DataMaintenancePage_UprightMaintenancePage from '../views/homePage/page/dataMaintenance/page/uprightMaintenance'
import HomePage_DataMaintenancePage_LineMaintenancePage from '../views/homePage/page/dataMaintenance/page/lineMaintenance'
import HomePage_DataMaintenancePage_MaintenanceScheduledInspectionDataPage from '../views/homePage/page/dataMaintenance/page/maintenanceScheduledInspectionData'
import HomePage_DataMaintenancePage_DataFileManagementPage from '../views/homePage/page/dataMaintenance/page/dataFileManagement'
import HomePage_DataMaintenancePage_MaintenanceTestingEquipmentPage from '../views/homePage/page/dataMaintenance/page/maintenanceTestingEquipment'
import HomePage_SystemSettingsPage_LoginLogPage from '../views/homePage/page/systemSettings/page/loginLog'
import HomePage_SystemSettingsPage_AccountManagementPage from '../views/homePage/page/systemSettings/page/accountManagement'
import HomePage_SystemSettingsPage_DefaultConfigurationPage from '../views/homePage/page/systemSettings/page/defaultConfiguration'
import HomePage_StatisticalQueryPage_SubstationLedgerPage from '../views/homePage/page/statisticalQuery/page/substationLedger'
import HomePage_SystemSettingsPage_ReviewWorkOrderPage from '../views/homePage/page/systemSettings/page/reviewWorkOrder'


interface Router {
  path: string,
  title: string,
  btnName?: string
  element: any,
  children?: Array<Router>
}



const routerList: Array<Router> = [
  {
    path: '/home',
    title: "主页",
    element: <HomePage />,
    children: [
      {
        path: "panoramicMonitoring",
        title: "全景监控页面",
        element: <HomePage_PanoramicMonitoringPage />
      },
      {
        path: "realRimeDynamics",
        title: "实时动态页面",
        element: <HomePage_RealRimeDynamicsPage />,
        children: [
          {
            path: "fullMainTransformer",
            title: "全主变页面",
            element: <HomePage_RealRimeDynamicsPage_FullMainTransformerPage />
          },
          {
            path: "multiMainTransformer",
            title: "多主变页面",
            element: <HomePage_RealRimeDynamicsPage_MultiMainTransformerPage />
          },
          {
            path: "singleMainTransformer",
            title: "单主变页面",
            element: <HomePage_RealRimeDynamicsPage_SingleMainTransformerPage />
          },
          {
            path: "fullLine",
            title: "全线路页面",
            element: <HomePage_RealRimeDynamicsPage_FullLinePage />
          },
          {
            path: "multipleLine",
            title: "多线路页面",
            element: <HomePage_RealRimeDynamicsPage_MultipleLinePage />
          },
          {
            path: "singleLine",
            title: "单线路页面",
            element: <HomePage_RealRimeDynamicsPage_SingleLinePage />
          },
          {
            path: "",
            title: "实时动态页面/默认页面",
            element: <Navigate to="/home/realRimeDynamics/fullMainTransformer" />,
          },
        ]
      },
      {
        path: "eventWarning",
        title: "事件预警页面",
        element: <HomePage_EventWarningPage />,
      
      },
      {
        path: "statisticalQuery",
        title: "统计查询页面",
        element: <HomePage_StatisticalQueryPage />,
        children: [
          {
            path: "eventStatistics",
            title: "事件统计页面",
            element: <HomePage_StatisticalQueryPage_EventStatisticsPage />
          },
          {
            path: "recordsOperations",
            title: "操作记录页面",
            element: <HomePage_StatisticalQueryPage_RecordsOperationsPage />
          },
          {
            path: "substationLedger",
            title: "站点台账页面",
            element: <HomePage_StatisticalQueryPage_SubstationLedgerPage />
          },
          {
            path: "mainTransformerLedger",
            title: "主变台账页面",
            element: <HomePage_StatisticalQueryPage_MainTransformerLedgerPage />
          },
          {
            path: "separateLedger",
            title: "隔直台账页面",
            element: <HomePage_StatisticalQueryPage_SeparateLedgerPage />
          },
          {
            path: "lineLedger",
            title: "线路台账页面",
            element: <HomePage_StatisticalQueryPage_LineLedgerPage />
          },
          {
            path: "curveAnalysis",
            title: "曲线分析页面",
            element: <HomePage_StatisticalQueryPage_CurveAnalysisPage />
          },
          {
            path: "mainTransformerHistoryData",
            title: "主变历史数据",
            element: <HomePage_StatisticalQueryPage_MainTransformerHistoryData />
          },
          {
            path: "lineHistoryData",
            title: "线路历史数据",
            element: <HomePage_StatisticalQueryPage_LineHistoryDataPage />
          },
          {
            path: "mainTransformerNumericalAnalysis",
            title: "主变数值分析页面",
            element: <HomePage_StatisticalQueryPage_MainTransformerNumericalAnalysisPage />
          },
          {
            path: "lineNumericalAnalysis",
            title: "线路数值分析页面",
            element: <HomePage_StatisticalQueryPage_LineNumericalAnalysisPage />
          },
          {
            path: "assessmentReport",
            title: "评估报告页面",
            element: <HomePage_StatisticalQueryPage_AssessmentReportPage />
          },
          {
            path: "",
            title: "统计查询页面/事件统计页面",
            element: <Navigate to="/home/statisticalQuery/eventStatistics" />,
          },
        ]
      },
      {
        path: "debuggingAndTesting",
        title: "调试测试页面",
        element: <HomePage_DebuggingAndTestingPage />,
        children: [
          {
            path: "manualSwitching",
            title: "手动投切页面",
            element: <HomePage_DebuggingAndTestingPage_ManualSwitchingPage />
          },
          {
            path: "strategicInvestment",
            title: "策略投切页面",
            element: <HomePage_DebuggingAndTestingPage_StrategicInvestmentPage />
          },
          {
            path: "portableDeviceAccess",
            title: "便携设备接入页面",
            element: <HomePage_DebuggingAndTestingPage_PortableDeviceAccessPage />
          },
          {
            path: "",
            title: "调试测试页面/手动投切页面",
            element: <Navigate to="/home/debuggingAndTesting/manualSwitching" />,
          },
        ]
      },
      {
        path: "dataMaintenance",
        title: "数据维护页面",
        element: <HomePage_DataMaintenancePage />,
        children: [
          {
            path: "substationMaintenance",
            title: "站点维护页面",
            element: <HomePage_DataMaintenancePage_SubstationMaintenancePage />
          },
          {
            path: "mainTransformerMaintenance",
            title: "主变维护页面",
            element: <HomePage_DataMaintenancePage_MainTransformerMaintenancePage />
          },
          {
            path: "uprightMaintenance",
            title: "隔直维护页面",
            element: <HomePage_DataMaintenancePage_UprightMaintenancePage />
          },
          {
            path: "lineMaintenance",
            title: "线路维护页面",
            element: <HomePage_DataMaintenancePage_LineMaintenancePage />
          },
          {
            path: "maintenanceScheduledInspectionData",
            title: "定检数据维护页面",
            element: <HomePage_DataMaintenancePage_MaintenanceScheduledInspectionDataPage />
          },
          {
            path: "dataFileManagement",
            title: "数据文件管理页面",
            element: <HomePage_DataMaintenancePage_DataFileManagementPage />
          },
          {
            path: "maintenanceTestingEquipment",
            title: "监测设备维护页面",
            element: <HomePage_DataMaintenancePage_MaintenanceTestingEquipmentPage />
          },
          {
            path: "",
            title: "数据维护页面/站点维护页面",
            element: <Navigate to="/home/dataMaintenance/substationMaintenance" />,
          },
        ]
      },
      {
        path: "systemSettings",
        title: "系统设置页面",
        element: <HomePage_SystemSettingsPage />,
        children: [
          {
            path: "loginLog",
            title: "操作日志页面",
            element:<HomePage_SystemSettingsPage_LoginLogPage />
          },
          {
            path: "reviewWorkOrder",
            title: "审核工单页面",
            element: <HomePage_SystemSettingsPage_ReviewWorkOrderPage />
          },
          {
            path: "accountManagement",
            title: "账号管理页面",
            element:<HomePage_SystemSettingsPage_AccountManagementPage />
          },
          {
            path: "defaultConfiguration",
            title: "默认配置页面",
            element:<HomePage_SystemSettingsPage_DefaultConfigurationPage />
          },
          {
            path: "",
            title: "系统设置页面/操作日志页面",
            element: <Navigate to="/home/systemSettings/loginLog" />,
          },
        ]
      },
      {
        path: '',
        title: "默认页面",
        element: <Navigate to="/home/panoramicMonitoring" />,
      },
    ],
  },
  {
    path: '/login',
    title: "登录",
    element: <LoginPage />,
  },
  {
    path: '/',
    title: "默认页面",
    element: <Navigate to="/login" />,
  },
  {
    path: '*',
    title: "默认页面",
    element: <Navigate to="/login" />,
  },
]


export default routerList